package com.suse.warmstill.common.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotNull;

/**
 * @author 黄靖
 * @author 2022-11-02 11:35
 * description:
 **/
@Data
@Validated
@ApiModel("文章的复合条件查询")
public class ArticleCondition {

    @ApiModelProperty("按照文章标题进行搜索")
    private String Title;

    @NotNull(message = "文章分类不能为空")
    @ApiModelProperty("按照文章分类进行搜索,传输 前端序号 ")
    private int category_id;



    @ApiModelProperty("按照时间排序 ,0 是正序 1是倒叙")
    private int orderByTime;

    /*@ApiModelProperty("按照浏览量排序,0是正序 1是倒叙 ")
    private int orderByView;

    @ApiModelProperty("按照点赞数排序,0是正序 1是倒叙")
    private int orderByPraise;*/

    @NotNull(message = "页面条数不能为空")
    @ApiModelProperty("页面条数，默认 为 10条")
    private int size = 10;

    @NotNull(message = "当前页数不能为空")
    @ApiModelProperty("当前页数 ，默认为 1")
    private int current = 1;


}
